package com.mf.model;

import java.util.Calendar;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "ORDDCM_MF_DNL")
public class Dinleme {
	private int id;
	private Kullanici kullanici;
	private String trackId;
	private String trackName;
	private String artistName;
	private String image;
	private Calendar baslangicTarih;
	private Calendar bitisTarih;

	// FIXME: AUTO duzenlenecek
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "ID")
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "KULLANICI_ID", nullable = false)
	public Kullanici getKullanici() {
		return kullanici;
	}

	public void setKullanici(Kullanici kullanici) {
		this.kullanici = kullanici;
	}

	@Column(name = "TRK_ID", nullable = false)
	public String getTrackId() {
		return trackId;
	}

	public void setTrackId(String trackId) {
		this.trackId = trackId;
	}

	@Column(name = "TRK_NAME")
	public String getTrackName() {
		return trackName;
	}

	public void setTrackName(String trackName) {
		this.trackName = trackName;
	}

	@Column(name = "ART_NAME")
	public final String getArtistName() {
		return artistName;
	}

	public final void setArtistName(String artistName) {
		this.artistName = artistName;
	}

	@Column(name = "BAS_TARIH", nullable = false)
	public final Calendar getBaslangicTarih() {
		return baslangicTarih;
	}

	public final void setBaslangicTarih(Calendar baslangicTarih) {
		this.baslangicTarih = baslangicTarih;
	}

	@Column(name = "BIT_TARIH")
	public final Calendar getBitisTarih() {
		return bitisTarih;
	}

	public final void setBitisTarih(Calendar bitisTarih) {
		this.bitisTarih = bitisTarih;
	}

	@Column(name = "IMAGE")
	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

}
